<template>
    <el-collapse-item v-if="enable" :name="name">
    <template #title>
        <span style="padding-left:20px">
          任务监听器<el-icon class="header-icon"><info-filled /></el-icon>
        </span>
     </template>
     <TaskListener
          :element="element"
          :bpmnModeler="bpmnModeler"
        />
  </el-collapse-item>
</template>
<script>
 import TaskListener from './parts/TaskListener.vue'
 import { is } from 'jeeplus-bpmn/lib/util/ModelUtil'
export default {
   props: {
     element: {
       type: Object,
       default: undefined
     },
     bpmnModeler: {
       type: Object,
       default: undefined
     },
     name: ''
   },
   components: {
     TaskListener
   },
   computed: {
     enable () {
       if (this.element && is(this.element, 'bpmn:UserTask')) {
         return true
       } else {
         return false
       }
     }
   },
   methods: {

   }
}
</script>